#! /usr/bin/python
# coding: utf-8

from Tkinter import *

root = Tk()

cv = Canvas(root, bg='white')

rt1 = cv.create_rectangle(10, 10, 110, 110, tags=('r1', 'r2', 'r3'))

rt2 = cv.create_rectangle(20, 20, 80, 80, tags=('s1', 's2', 's3'))

rt3 = cv.create_rectangle(30, 30, 70, 70, tags=('y1', 'y2', 'y3'))

cv.addtag_above('r4', rt2)
cv.addtag_below('r5', rt2)

for item in [rt1,  rt2, rt3]:
    print cv.gettags(item)
    
cv.pack()

root.mainloop()
